#ifndef _CP_LOADED_HPP
#define _CP_LOADED_HPP 1

#include <boost/shared_ptr.hpp>
#include "../constants.hpp"
#include "../Parameters.hpp"
#include "MacArrayMessage.hpp"

namespace BFT
{
	namespace messages
	{
		class CPLoaded : public MacArrayMessage
		{
		
			public:
			
			CPLoaded(uint32_t _seq, uint32_t _sender);
			
			CPLoaded(boost::shared_ptr<char> _bytes, int _bytes_size);
			
			uint32_t getSequenceNumber(); //inlined
			
			uint32_t getSendingReplica(); //inlined
			
			void printInfo();
			
			protected:
			
			uint32_t seqNo;
			
			private:
			
			static int computeSize(); //inlined	
		};
		
		inline int CPLoaded::computeSize() {return SEQUENCE_NUMBER_SIZE;}
		
		inline uint32_t CPLoaded::getSequenceNumber() {return seqNo;}
		
		inline uint32_t CPLoaded::getSendingReplica() {return getSender();}
	}
	
}

#endif
